Currently, in all representative big-data query systems (such as Hive, Shark, and Impala), a single query statement is used as a basic unit for parsing and optimization. Key performance of a big-data query system is query efficiency. However, in a data warehouse batch query scenario, a conventional processing mode of using a single query statement as a basic unit for parsing and optimization has a problem of optimization opportunity shortage. What contrasts sharply with intra-query optimization opportunity shortage is rich inter-query optimization opportunities presented in the data warehouse batch query application scenario. An inter-query optimization opportunity is an optimization opportunity among multiple query statements.
In the prior art, in a batch query application scenario, a specific data record that needs to be accessed in each query is dynamically obtained in a manner such as monitoring and feeding back, in real time, a data record update status in a process of executing a query statement, or executing some functions in the query statement in advance, to determine whether there is a conflict or an intersection set among data records operated in multiple queries, and execute some dynamic optimization based on the foregoing analysis. However, dynamic data dependency related to only a group of input can be collected by monitoring a data record or executing some query functions, and optimization executed based on the dynamic data dependency can be applicable to only a group of specific input. Once the input changes, analysis and optimization need to be re-executed.